package com.ruoyi.smart.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.smart.mapper.SmartEquipmentMapper;
import com.ruoyi.smart.domain.SmartEquipment;
import com.ruoyi.smart.service.ISmartEquipmentService;

/**
 * 设备Service业务层处理
 * 
 * @author minwei
 * @date 2022-04-07
 */
@Service
public class SmartEquipmentServiceImpl implements ISmartEquipmentService 
{
    @Autowired
    private SmartEquipmentMapper smartEquipmentMapper;

    /**
     * 查询设备
     * 
     * @param id 设备主键
     * @return 设备
     */
    @Override
    public SmartEquipment selectSmartEquipmentById(Long id)
    {
        return smartEquipmentMapper.selectSmartEquipmentById(id);
    }

    /**
     * 查询设备列表
     * 
     * @param smartEquipment 设备
     * @return 设备
     */
    @Override
    public List<SmartEquipment> selectSmartEquipmentList(SmartEquipment smartEquipment)
    {
        return smartEquipmentMapper.selectSmartEquipmentList(smartEquipment);
    }

    /**
     * 新增设备
     * 
     * @param smartEquipment 设备
     * @return 结果
     */
    @Override
    public int insertSmartEquipment(SmartEquipment smartEquipment)
    {
        return smartEquipmentMapper.insertSmartEquipment(smartEquipment);
    }

    /**
     * 修改设备
     * 
     * @param smartEquipment 设备
     * @return 结果
     */
    @Override
    public int updateSmartEquipment(SmartEquipment smartEquipment)
    {
        return smartEquipmentMapper.updateSmartEquipment(smartEquipment);
    }

    /**
     * 批量删除设备
     * 
     * @param ids 需要删除的设备主键
     * @return 结果
     */
    @Override
    public int deleteSmartEquipmentByIds(Long[] ids)
    {
        return smartEquipmentMapper.deleteSmartEquipmentByIds(ids);
    }

    /**
     * 删除设备信息
     * 
     * @param id 设备主键
     * @return 结果
     */
    @Override
    public int deleteSmartEquipmentById(Long id)
    {
        return smartEquipmentMapper.deleteSmartEquipmentById(id);
    }
}
